package ch.epfl.lara.matcheck.util;

object FreshName {
  
  type Letter = Char
  type VarName = String
  
  
  private val SEP: String = "__" 
  private var COUNTER : Int = 0 
  
  //private var CH : Letter = 'a'   
 
  private def timestamp(): Int = {
    COUNTER += 1
    COUNTER
  }
  /*
  private def resetCh(): Unit = CH = 'a'
  private def nextCh(): Unit = CH = (CH+1).toChar
  */
  
  def fresh(name: VarName) = name + SEP + (timestamp()) 
   /*
  def fresh(): VarName = {
    val ch: Letter = CH
    val count: Int = timestamp()
    ch match {
      case 'z' => resetCh()
      case _ if ch >= 'a' && ch < 'z' => nextCh()
    }
    "" + ch + SEP + count
  } */
  /*
  def methodParams(n: Int): List[VarName] = 
    for(index<-List.range(1,n+1)) yield {
      fresh()
    }
  */
  
    
}
